package com.asia5b.a5mall.order.widget

import android.content.Context
import androidx.databinding.DataBindingUtil
import androidx.constraintlayout.widget.ConstraintLayout
import android.util.AttributeSet
import android.view.LayoutInflater
import com.asia5b.a5mall.middleware.model.member.AddressModel
import com.asia5b.a5mall.order.R
import com.asia5b.a5mall.order.databinding.ItemOrderplaceAddressBinding

class OrderPlaceAddressView @JvmOverloads constructor(
        context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) {
    var addressModel: AddressModel?=null
    set(value) {
        field=value
        addressBinding.data = value
    }
    val addressBinding: ItemOrderplaceAddressBinding

    init {
        addressBinding = DataBindingUtil.inflate<ItemOrderplaceAddressBinding>(LayoutInflater.from(context), R.layout.item_orderplace_address, this, true)
    }


}